package com.sdkdjn.utils;

/**
 * 智能门禁系统全局返回对象
 * @ClassName: IEGResult  
 * @Description: TODO  
 * @author xiaoshengfu(2439323118@qq.com)  
 * @date: 2018年5月24日 下午8:32:28
 */
public class IEGResult {

	public static final int OK = 200;
	public static final int WANING = 300;
	public static final int ERROR = 500;

	public Integer stateCode;
	public String message;
	public Object data;

	public IEGResult(Integer stateCode, String message, Object data) {
		super();
		this.stateCode = stateCode;
		this.message = message;
		this.data = data;
	}

	public Integer getStateCode() {
		return stateCode;
	}

	public void setStateCode(Integer stateCode) {
		this.stateCode = stateCode;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public static IEGResult iEGResultOK(Object data) {
		return new IEGResult(OK, null, data);
	}

	public static IEGResult iEGResultError(String message) {
		return new IEGResult(ERROR, message, null);
	}
}
